import 'package:flutter/material.dart';
import 'package:moose_app/ui/screens/discovery/discovery_screen.dart';
import 'package:moose_app/ui/screens/home/home_screen.dart';
import 'package:moose_app/ui/screens/mime/mime_screen.dart';
import 'package:moose_app/ui/screens/shop_cart/shop_cart_screen.dart';

class ATHMainBody extends StatefulWidget {
  final PageController pageController;

  ATHMainBody({@required this.pageController});

  @override
  _ATHMainBodyState createState() => _ATHMainBodyState();
}

class _ATHMainBodyState extends State<ATHMainBody> {
  List<Widget> _mainBodies = [];

  @override
  void initState() {
    _mainBodies
      ..add(ATHHomeScreen())
      ..add(ATHDiscoveryScreen())
      ..add(ATHShopCartScreen())
      ..add(ATHMimeScreen());
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return PageView(
      children: _mainBodies,
      pageSnapping: false,
      physics: NeverScrollableScrollPhysics(),
      controller: widget.pageController,
    );
  }
}
